<extend name="Index/index" />
<block name="css1">
    <link rel="stylesheet" type="text/css" href="__ROOT__/public/mycss/contribute.css">
    <script src="__ROOT__/public/js/jquery.min.js"></script>
        <script src="__ROOT__/public/myjs/contribute.js"></script>
    <style>
        body{
            margin:0px;
            background-color:#f5f5f5;
        }
    </style>
</block>
<block name="main">
<!-- 编辑器开始 -->
<div class="e">
 <div  class="c"></div>
<center><h1 class="mt50">投稿</h1></center>
        <form id="biaodan" action="<{:U('Contribute/dopost')}>" method="post" enctype="multipart/form-data"  >
            <div id="box" class="mt60">
            <input id="title" type="text" name="title" value="<{$data.title}>" placeholder="请输入标题，1-30个字" maxlength="30">
            <!-- 加载编辑器的容器 -->
            <script id="contribute" name="content" type="text/plain"><?php echo html_entity_decode($data['content']);   ?> 
            </script>
            <input type="file" name="cover" />
            <select name="cate_id">

            <volist name="category" id="val">
                文章分类:<option value="<{$val['id']}>"><{$val['cname']}></option>
            </volist>
            </select>
            </div>
        <p id="error"></p>
            <center><button style="width:150px;" id="bt" class="mb40  btn-lg btn-info mt30" type="submit">发表</button> <button style="width:150px;height:60px;" class="btn-lg btn-default" id="draft">存草稿</button></center>
        </form>
</div>
<!-- <form action="contribute/up_img" enctype="multipart/form-data" method="post" >
<input type="file" name="cover" />
<input type="submit" value="提交" >
</form> -->


        <!-- 配置文件 -->
        <script type="text/javascript" src="__ROOT__/public/ude/ueditor.config.js"></script>
        <!-- 编辑器源码文件 -->

        <script type="text/javascript" src="__ROOT__/public/ude/ueditor.all.js"></script>
        <!-- 实例化编辑器 -->
        <script type="text/javascript">
            var ue = UE.getEditor('contribute',{
                toolbars: [
                    ['fullscreen', 'source', 'undo', 'redo', 'fontsize', 'bold', 'italic', 'underline', 'fontborder', 'strikethrough','emotion','simpleupload','insertimage','music','scrawl','insertvideo'],
                    [ 'superscript', 'subscript', 'removeformat', 'formatmatch', 'autotypeset', 'blockquote', 'pasteplain', '|', 'forecolor', 'backcolor', 'insertorderedlist', 'insertunorderedlist', 'selectall', 'cleardoc','map']
                ]
            });
            var lang = ue.getOpt('lang');
            console.log(lang);
            ue.setContent('123456');
        </script>
        <script type="text/javascript">
        var url = "<{:U('Myarticle/save_draft')}>";
        </script>

        



<!-- 编辑器结束 -->


</block>























